module.exports = function (sequelize, DataTypes) {
    let dataSource = sequelize.define(
        'data_source', {
            data_source_id: {
                type: DataTypes.INTEGER(11),
                allowNull: false,
                autoIncrement: true,
                primaryKey: true
            },
            data_source_name: {
                type: DataTypes.STRING,
                allowNull: true
            },
            data_source_alias: {
                type: DataTypes.STRING,
                allowNull: true
            },
            data_source_degree: {
                type: DataTypes.INTEGER(11),
                allowNull: false
            },
            creator: {
                type: DataTypes.STRING,
                allowNull: true
            },
            creat_time: {
                type: DataTypes.DATE,
                allowNull: true
            },
            updator: {
                type: DataTypes.STRING,
                allowNull: true
            },
            update_time: {
                type: DataTypes.DATE,
                allowNull: true
            },
            status: {
                type: DataTypes.INTEGER(11),
                allowNull: false
            },
            conc_degree: {
                type: DataTypes.INTEGER(11),
                allowNull: true
            },
            avatar: {
                type: DataTypes.STRING,
                allowNull: true
            }
        },
        {
            tableName: 'data_source',
            timestamps: false
        }
    );

    return dataSource;
};

